<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@include file="public.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="html/text ; charset=UTF-8">
<script type="text/javascript" src="${contextPath}/csair/js/jquery-1.11.1.min.js" charset="UTF-8"></script>
<script type="text/javascript" src="${contextPath}/csair/js/soundmanager2.js" charset="UTF-8"></script>
<script type="text/javascript" src="${contextPath}/csair/js/init.js" charset="UTF-8"></script>
<script type="text/javascript" src="${contextPath}/csair/js/jquery.blockUI.min.js" charset="UTF-8"></script>
<script type="text/javascript" src="${contextPath}/csair/js/public.js" charset="UTF-8"></script>
<script type="text/javascript" src="${contextPath}/csair/js/citiesData.js" charset="UTF-8"></script>
<script type="text/javascript" src="${contextPath}/csair/js/flightQuery2.js" charset="UTF-8"></script>
<script type="text/javascript" src="${contextPath}/csair/js/navBlock.js" charset="UTF-8"></script>
<script type="text/javascript" src="${contextPath}/csair/js/jquery.cookie.js" charset="UTF-8"></script>
<script type="text/javascript" src="${contextPath}/csair/js/cookie.js" charset="UTF-8"></script>
<link rel="stylesheet" href="${contextPath}/csair/css/flightQuery2.css" />
<link rel="stylesheet" href="${contextPath}/csair/css/public.css" />
<style type="text/css">
#cfcs, #ddcs {
	width: 130px;
}
#year{
	width: 70px;
}
#month,#day{
	width: 50px;
}
#year2{
	width: 70px;
}
#month2,#day2{
	width: 50px;
}
#search_div_btn{
	margin-left:0px;
}


</style>
<script type="text/javascript">
function chang_cf_dd(){
	
	var cfcs = $("#cfcs").val();
	var ddcs = $("#ddcs").val();

	$("#cfcs").val(ddcs);
	$("#ddcs").val(cfcs);
};


</script>

</script>
<title>航班查询</title>
</head>
<body>
	<div style="width: 1000px; margin: 0 auto; position: relative;">
		<a href="/iac/wca.html" style="float: right;margin-left: 10px; " id="toolbarCtrl" title="点此此处开启低视力人群工具条">开启低视力人群工具条</a>
	<!-- <a href="/iac/toolbar/help.html" style="float: right;" id="toolbarHelp" title="点此查看无障碍帮助和相关设置">无障碍帮助和相关设置</a>-->	

	</div>
	<div class="header">
		<div class="container">
			<img id="logo" src="${contextPath}/csair/img/logo.jpg" alt="标志" />
		</div>
	</div>
<%@include file="nav2.jsp"%>
	<!--  请在<span id="count" style="font-weight: bold;color: red;"> 300 </span>秒内进行操作-->
	<input type="hidden" id="year1" value="${year }">
	<input type="hidden" id="month1" value="${month }">
	<input type="hidden" id="day1" value="${day }">
	<input type="hidden" id="year22" value="${year2 }">
	<input type="hidden" id="month22" value="${month2 }">
	<input type="hidden" id="day22" value="${day2 }">
	<input type="hidden" id="cf" value="${cf }">
	<input type="hidden" id="dd" value="${dd }">
	<div class="container">
		<div class="flight_sel select_wrap">
			<div class="flight_choosen_search">
				<div>
					<input id="dancheng" type="button" value="单程" title="选择单程按钮" onclick="dancheng()">&nbsp;&nbsp;&nbsp;&nbsp;
					<input id="fancheng" type="button" value="往返" title="选择返程按钮" onclick="fancheng()">
				</div>
				<div>
					<label for="cfcs">出发城市：</label> 						 
					<select id="cfcs" title="现在是航班查询页面如果您不想更改行程请忽略此条提示,如果您想更改行程请在此处操作,出发城市">
							<option>支持首字母简拼</option>
							<optgroup label="A"></optgroup>
							<optgroup label="B"></optgroup>
							<optgroup label="C"></optgroup>
							<optgroup label="D"></optgroup>
							<optgroup label="E"></optgroup>
							<optgroup label="F"></optgroup>
							<optgroup label="G"></optgroup>
							<optgroup label="H"></optgroup>
							<optgroup label="I"></optgroup>
							<optgroup label="J"></optgroup>
							<optgroup label="K"></optgroup>
							<optgroup label="L"></optgroup>
							<optgroup label="M"></optgroup>
							<optgroup label="N"></optgroup>
							<optgroup label="O"></optgroup>
							<optgroup label="P"></optgroup>
							<optgroup label="Q"></optgroup>
							<optgroup label="R"></optgroup>
							<optgroup label="S"></optgroup>
							<optgroup label="T"></optgroup>
							<optgroup label="U"></optgroup>
							<optgroup label="V"></optgroup>
							<optgroup label="W"></optgroup>
							<optgroup label="X"></optgroup>
							<optgroup label="Y"></optgroup>
							<optgroup label="Z"></optgroup>
						</select>
					<a id = "chang_cf_dd" class="chang_dest" href="javascript:void(0);"  onclick="chang_cf_dd();" title="点击转换出发城市和到达城市"></a> 
					
					<label for="ddcs">到达城市：</label> 
					<select id="ddcs" title="航班查询页面,如果您不想更改行程请忽略此条提示,如果您想更改行程请在此处操作,到达城市">
							<option>支持首字母简拼</option>
							<optgroup label="A"></optgroup>
							<optgroup label="B"></optgroup>
							<optgroup label="C"></optgroup>
							<optgroup label="D"></optgroup>
							<optgroup label="E"></optgroup>
							<optgroup label="F"></optgroup>
							<optgroup label="G"></optgroup>
							<optgroup label="H"></optgroup>
							<optgroup label="I"></optgroup>
							<optgroup label="J"></optgroup>
							<optgroup label="K"></optgroup>
							<optgroup label="L"></optgroup>
							<optgroup label="M"></optgroup>
							<optgroup label="N"></optgroup>
							<optgroup label="O"></optgroup>
							<optgroup label="P"></optgroup>
							<optgroup label="Q"></optgroup>
							<optgroup label="R"></optgroup>
							<optgroup label="S"></optgroup>
							<optgroup label="T"></optgroup>
							<optgroup label="U"></optgroup>
							<optgroup label="V"></optgroup>
							<optgroup label="W"></optgroup>
							<optgroup label="X"></optgroup>
							<optgroup label="Y"></optgroup>
							<optgroup label="Z"></optgroup>
						</select>
					</div>	
					<label>出发日期：</label> 
					<select id="year" title="如果您不想更改行程请忽略此条提示,如果您想更改行程请在此处操作,出发日期选择年份"></select> <select id="month" title="选择月份"></select> <select id="day" title="选择日期"></select>
					<label class="fancheng" style="display:none;">返程日期：</label> 
					<select class="fancheng" style="display:none;" id="year2" title="如果您不想更改行程请忽略此条提示,如果您想更改行程请在此处操作,返程日期选择年份"></select> <select style="display:none;" class="fancheng" id="month2" title="选择月份"></select> <select style="display:none;" class="fancheng" id="day2" title="选择日期"></select>	
				
				<button type="button" id="search_div_btn">立即查询</button>
			</div>
			<div class="flight_choosen">
				<div class="flight_choosen_info">
					<div class="flight_choosen_destination">${qc }</div>
					<div class="flight_choosen_date">${rq }</div>
					<div class="flight_choosen_passengers">
						旅客人数： <span class="flight_choosen_passengers_adult" id="adult">${adult }</span> <span class="flight_choosen_passengers_child" id="child">${child }</span> <span class="flight_choosen_passengers_baby" id="baby">${baby }</span>
					</div>
					<div class="clearboth"></div>
				</div>
				<ul class="flight_week">
					<c:forEach items="${kalendars}" var="item">
					<c:if test="${item.current eq 'current'}">
						<li class="choosed" >
					</c:if>
					<c:if test="${item.current ne 'current'}">
						<li>
					</c:if>
					<a href="week?w=${item.id}&cf=${cf}&dd=${dd}&year=${year}&month=${month}&day=${day}&year2=${year2}&month2=${month2}&day2=${day2}" title="点击ctrl加下按钮查看航班列表">
							<div class="flight_week_info">
								<span id="" class="flight_week_info_num">${item.week}</span> <span id="" class="flight_week_info_date"> ${item.date} </span>
							</div>
							<div class="flight_week_price">最低票价${item.price}</div>
					</a></li>
					</c:forEach>
					<div class="clearboth"></div>
				</ul>
			</div>

			
			
			<div class="flight_sel_result">
				<span id="errorAlert" style="font-size: 18px; color: red;"><b>${noflight }${noflight1 }${errorAlert }</b></span>
				<c:if test="${noflight == null}">
				<c:if test="${noflight1 == null}">
				<c:if test="${errorAlert == null}">
				<div class="flight_sel_title">
					<ul class="flight_sel_result_ul even navBlock" title="此处为舱位表头,分别是：头等舱、公务舱、明珠经济舱、经济舱，点击ctrl加下按钮查看航班列表">
						<li class="flight_sel_result_dest">
						</li>
						<li class="flight_sel_result_price">
						<a>头等舱</a>
						<a>公务舱</a>
						<a>明珠经济舱</a>
						<a>经济舱</a>
						</li>
						<div class="clearboth"></div>
					</ul>
				</div>
				</c:if>
				</c:if>
				</c:if>
				<c:forEach items="${flights}" var="item" varStatus="status">
				
				<ul class="flight_sel_result_ul even navBlock">
				<a href="javascript:enterA(this);" onclick="enterA(this);" class="question" style="float: left;" title="航班号:${item.hbh}起飞时间:${item.qf_time}到达时间:${item.dd_time},继续按tab键选择该航班舱位" ><img src="${contextPath}/csair/img/question.png"></a>
					<li class="flight_sel_result_dest">
						<div class="flight_sel_result_dest_start">
							
							<div class="flight_sel_result_dest_time">${item.qf_time}分</div>
							<div class="flight_sel_result_dest_city">${item.qf_city}</div>
						</div>
						<div class="flight_sel_result_dest_plane_info">
							<div class="flight_num">${item.hbh}</div>
							<div class="flight_type">${item.jx}</div>
						</div>
						<div class="flight_sel_result_dest_end">
							<c:choose>
								<c:when test="${fn:contains(item.dd_time, '+')}">
									<c:set var="ddTime" value="${fn:split(item.dd_time, '+')}" />
									<div class="flight_sel_result_dest_time">${ddTime[0]}分   +1</div>
								</c:when>
								<c:otherwise>
									<div class="flight_sel_result_dest_time">${item.dd_time}分</div>
								</c:otherwise>
							</c:choose>
							<div class="flight_sel_result_dest_city">${item.dd_city}</div>
						</div>
					</li>
				<!--  <a href="javascript:void(0);"  style="float: left; margin-top:30px;" title="详情" ><img src="${contextPath}/csair/img/question.png">详情</a>-->	
					<li class="flight_sel_result_price">
					<c:if test="${item.tdc!=null && item.tdc ne '' && item.tdc!='售罄'}"><a href="${item.tdc_href}" title="头等舱,票价${item.tdc}元，点击购票" >${item.tdc}</a> </c:if>
					<c:if test="${item.tdc==null || item.tdc eq '' }"><a href="javascript:void(0);" title="此航班头等舱空缺">无</a></c:if>
					<c:if test="${item.gwc!=null && item.gwc ne '' && item.gwc!='售罄'}"><a href="${item.gwc_href}" title="公务舱,票价${item.gwc}元，点击购票" >${item.gwc}</a> </c:if>
					<c:if test="${item.gwc==null || item.gwc eq '' }"><a href="javascript:void(0);" title="此航班公务舱空缺">无</a></c:if>
					<c:if test="${item.mzjjc!=null && item.mzjjc ne '' && item.mzjjc!='售罄'}"><a href="${item.mzjjc_href}" title="明珠经济舱,票价${item.mzjjc}元，点击购票" >${item.mzjjc}</a> </c:if>
					<c:if test="${item.mzjjc==null || item.mzjjc eq '' }"><a href="javascript:void(0);" title="此航班明珠经济舱空缺">无</a></c:if>
					<c:if test="${item.jjc!=null && item.jjc ne '' && item.jjc !='售罄'}"><a href="${item.jjc_href}" title="经济舱,票价${item.jjc}元，点击购票" >${item.jjc}</a></c:if>
					<c:if test="${item.jjc==null || item.jjc eq '' }"><a href="javascript:void(0);" title="此航班经济舱空缺">无</a></c:if>
					<c:if test="${item.jjc=='售罄' }"><a href="javascript:void(0);" title="此航班经济舱空缺">${item.jjc}</a></c:if>
					</li>
					<div class="clearboth"></div>
				</ul>
				</c:forEach>
			</div>
		</div>
	</div>
	<div class="page_mask_div" style="z-index: 99">
			<div class="page_mask_con">
				<div class="no_login_ticket">
					<div class="no_login_ticket_con">
						<div class="no_login_ticket_con_left">
							<div class="no_login_ticket_con_left_login">
								<h2>会员登录</h2>
								<input type="text" name="username" id="username" title="登录用户名" placeholder="手机号/邮箱/会员号/证件号" />
								<input name="password" id="loginpassword" type="password" title="登录密码" placeholder="密码" />
								<button type="button" class="bluebtn" id="loginbuy" onkeypress="tologin()" onclick="tologin()" title="点击登录">登录</button>
								<button type="button" class="bluebtn" id="closePop" title="关闭登录窗口">关闭登录窗口</button>
							</div>
							<div class="clearboth"></div>
						</div>
					<div class="clearboth"></div>
				</div>
			</div>
		</div>
	</div>
	<div class="tooltip-content" id="kpxx" style="display:none;"></div>
	<div class="tooltip-content" id="lcxx" style="display:none;"></div>
	<div class="tooltip-content" id="xlxx" style="display:none;"></div>
	<span id="checkloadtime" onclick="loadtime()" >查看加载时间</span>
	<div id="loadtime" style="display:none;">${Time }</div>
	<%@include file="footer2.jsp"%>
	<%@include file="footer.jsp"%>
</body>
</html>

